using System;

namespace QLNHK.BLL
{
	/// <summary>
	/// Summary description for cls_Role.
	/// </summary>
	public class cls_Role
	{
		private bool _HienThi;
		private bool _Them;
		private bool _Sua;
		private bool _Xoa;
		private bool _KichHoat;
		public bool HienThi
		{
			get{return this._HienThi;}
		}
		public bool Them
		{
			get{return this._Them;}
		}
		public bool Sua
		{
			get{return this._Sua;}
		}
		public bool Xoa
		{
			get{return this._Xoa;}
		}
		public bool KichHoat
		{
			get{return this._KichHoat;}
		}
		public cls_Role()
		{
		}
		public cls_Role(string MaTruyCap)
		{
			for(int i=0;i<5;i++)
			{
				switch(i)
				{
					case 0:
						if( MaTruyCap.Substring(i,1).Equals("1"))
						{
							this._HienThi = true;
						}
						else
						{
							this._HienThi = false;
						}
						break;
					case 1:
						if( MaTruyCap.Substring(i,1).Equals("1"))
						{
							this._Them = true;
						}
						else
						{
							this._Them = false;
						}
						break;
					case 2:
						if( MaTruyCap.Substring(i,1).Equals("1"))
						{
							this._Sua = true;
						}
						else
						{
							this._Sua = false;
						}
						break;
					case 3:
						if( MaTruyCap.Substring(i,1).Equals("1"))
						{
							this._Xoa = true;
						}
						else
						{
							this._Xoa = false;
						}
						break;
					case 4:
						if( MaTruyCap.Substring(i,1).Equals("1"))
						{
							this._KichHoat = true;
						}
						else
						{
							this._KichHoat = false;
						}
						break;
				}
			}
		}
	}
}
